package com.xdxc.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.List;

@Data
@TableName("subject")
public class Subject {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    @TableField("parent_id")
    private Long parentId;

    private Byte level;
    private Byte status;
    private Integer sort;
    @TableField(exist = false)  // 表示该字段不是数据库字段
    private List<Subject> children;
    @TableLogic(value = "0", delval = "1")
    @TableField("is_deleted")
    private Byte deleted;
    private String icon;
}